package com.martys.singleton01;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


public class Application {

	//测试这个用静态常量实现的饿汉式单例模式
	public static void main(String[] args) {
		Singleton01 instance1 = Singleton01.getInstance();
		System.out.println("instance1 hashcode： "+instance1.hashCode());
		Singleton01 instance2= Singleton01.getInstance();
		System.out.println("instance2 hashcode： "+instance2.hashCode());
	}

}
